1. Field of the Invention
This invention relates to a key code generator for electronic musical instruments, and more particularly to a key code generator which generates key codes corresponding to closed switches of an electronic musical instrument.
2. Description of the Prior Art
In an electronic musical instrument having many key switches such as an electronic organ, if the switches are connected directly to desired circuits so as to supply thereto information of closing of the switches, the amount of wiring becomes very large. Further, in the case where the circuits to be connected with the switches are formed as an integrated circuit, the number of pins of semiconductor elements is limited, making it difficult to employ the integrated circuit. Moreover, conventional digital organs having a key assignor usually employ, as a method of detecting turned-on switches, a method of sending information of closed switches in the form of a TDM (Time-Division Modulation) signal or a PCM (Pulse Code Modulation) signal synchronized therewith, by time-division scanning of all switches. With this method, however, since the states of all of the switches are checked in the time-divisional manner, information of the switches in the off state is also sent. This leads to a decreased response speed and, for an increased response speed, it is necessary to raise the clock frequency. For instance, if one scanning period is 256 bits and if the clock frequency is 200 KHz, 1.26 ms. is needed for one scanning. Further, when the switch is turned on immediately after the scanning, outputting of the information lags by one scanning period, resulting in a time lag in response.